module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;
  const RoleSchema = new Schema({
    id: {
      type: String,
      require: true // 必填项
    },
    name: {
      type: String,
      require: true // 必填项
    },
    image: {
      type: String,
      require: true
    },
    price: {
      type: Number,
      require: true
    },
    num: {
      type: Number,
      require: true
    },
    userId: {
      type: String,
      require: true
    },
  });
  return mongoose.model("Cart", RoleSchema, "cart");
};
